﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DARE
{
    public class CMainWindowData : CWidgetData
    {
        public CMenuBarData menuBar;
        public CWidgetData content;

        public override void FillDataStructure(CWidget wid)
        {
            CMainWindow w = wid as CMainWindow;
            base.FillDataStructure(wid);
            content = new CWidgetData();
            content.FillDataStructure(w.Content);
            menuBar = new CMenuBarData();
            menuBar.FillDataStructure(w.Menubar);
        }

        public override void FillFromDataStructure(ref CWidget wid, CHUDSystem hud)
        {
            base.FillFromDataStructure(ref wid, hud);
            (wid as CMainWindow).Menubar = hud.GetElement(menuBar.name) as CMenuBar;
            (wid as CMainWindow).Content = hud.GetElement(content.name);
        }
    }
}
